home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / Tools Plus 2.5 / Tools Plus 2.5 (C⁄C++ & Pascal) / User Manual / 02-Installing Tools Plus < prev    next >
Encoding:
Text File  |  1994-05-24  |  9.6 KB  |  218 lines  |  [TEXT/ttxt]

  1. 2  Installing Tools Plus
  2. ````````````````````````
  3.  
  4.  
  5.  
  6.  
  7.  
  8. Tools Plus Contents
  9. ```````````````````
  10. Tools Plus for THINK Pascal and Tools Plus for THINK C are located in two separate folders.  Tools Plus is made up of the following items:
  11.  
  12.    “ToolsPlus.Lib1”  Library containing Tools Plus routines (1 of 3)
  13.  
  14.    “ToolsPlus.Lib2”  Library containing Tools Plus routines (2 of 3)
  15.  
  16.    “ToolsPlus.Lib3”  Library containing Tools Plus routines (3 of 3)
  17.  
  18.    “ToolsPlus.h”     C header file for Tools Plus
  19.                      (C only)
  20.  
  21.    “ToolsPlus.c”     Source code for routines that must be compiled with
  22.                      your application.  These routines will be compiled
  23.                      according to your project’s compiler settings for
  24.                      680x0 processor and/or math co-processor
  25.                      optimization.
  26.                      (C only)
  27.  
  28.    “ToolsPlus.p”     Pascal interface file for Tools Plus
  29.                      (Pascal only)
  30.  
  31.    “Palette WDEF”    Optional resource file containing the WDEF resource
  32.                      (window definition) for floating palettes. Found in
  33.                      the “Optional Resources” folder.
  34.  
  35.    “Demos”           Folder containing a demo application and its source
  36.                      code
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Installing Tools Plus for THINK C
  43. `````````````````````````````````
  44.   This User Manual is also part of the Tools Plus package.  Drag the ToolsPlus.Lib1, ToolsPlus.Lib2 and ToolsPlus.Lib3 libraries into the C Libraries folder, and ToolsPlus.h into the Mac #includes folder, or where ever you keep your other libraries and header files.  You can drag the ToolsPlus.c file into your C Libraries folder, even though it is not a library.  Keeping it with the ToolsPlus.Lib1, ToolsPlus.Lib2 and ToolsPlus.Lib3 libraries will help to remind you to include ToolsPlus.c in your project.
  45.  
  46.  
  47.  
  48.  
  49.  
  50. Adding Tools Plus to a THINK C Project
  51. ``````````````````````````````````````
  52.   To add Tools Plus to a THINK C project, first open your project, then use the Source menu’s Add… command to add the file ToolsPlus.Lib1, ToolsPlus.Lib2, ToolsPlus.Lib3, and ToolsPlus.c.
  53.   Though libraries can be located anywhere in your project, placing them at the top will organize it a little better.  Drag each of the libraries (ToolsPlus.Lib1, ToolsPlus.Lib2, and ToolsPlus.Lib3) into their own segment.  For convenience, drag ToolsPlus.c to the segment containing the last Tools Plus library.
  54.  
  55.  
  56.  
  57.  
  58.  
  59. Tools Plus Segments in THINK C
  60. ``````````````````````````````
  61.   The segments containing Tools Plus libraries will be constantly accessed while your application is running.  It is preferable to pre-load those segments by flagging them as “Preload.”
  62.  
  63. Warning: Do not unload the segments containing Tools Plus libraries.
  64.          You can ensure that this doesn’t happen accidentally by
  65.          flagging them as not “Purgeable.”
  66.  
  67.  
  68.  
  69.  
  70. -----------------------------------------------------------------------
  71.  
  72.  
  73.  
  74.  
  75. Installing Tools Plus for THINK Pascal
  76. ``````````````````````````````````````
  77. This User Manual is also part of the Tools Plus package.  Drag the ToolsPlus.Lib1, ToolsPlus.Lib2, and ToolsPlus.Lib3 libraries into the Libraries folder, and ToolsPlus.p into the Interface folder, or where ever you keep your other libraries and interfaces.
  78.  
  79.  
  80.  
  81.  
  82.  
  83. Adding Tools Plus to a THINK Pascal Project
  84. ```````````````````````````````````````````
  85.   To add Tools Plus to a THINK Pascal project, first open your project, then use the Project menu’s Add File command to add the files ToolsPlus.Lib1, ToolsPlus.Lib2, ToolsPlus.Lib3, and ToolsPlus.p to your project.
  86.  
  87.   Build Order…
  88.     Though libraries can be located anywhere in your build order,
  89.     placing them near the top (early in the compiling order) will
  90.     organize your project a little better.  The ToolsPlus.p interface
  91.     has to be compiled BEFORE your source code makes reference to it.
  92.     Placing it immediately below the libraries is a good, safe place
  93.  
  94.   By Segment…
  95.     Drag each of the Tools Plus libraries into their own segment.  For
  96.     convenience, drag the ToolsPlus.p interface file into the segment
  97.     containing the last Tools Plus library.
  98.  
  99.  
  100.  
  101.  
  102.  
  103. After Compiling
  104. ```````````````
  105.   So far, you’ve told THINK Pascal what files to use and the order in which they should be compiled.  When you compile your project the first time, THINK Pascal loads the specified libraries and integrates them into your project file, and it compiles source files (including ToolsPlus.p) and integrates them in your project file.  After your first compile, you’ll notice that THINK Pascal automatically added several items to your project file:
  106.       «ToolsPlus.Lib1:1»
  107.       «ToolsPlus.Lib2:1»
  108.       «ToolsPlus.Lib3:1»
  109.       «%_MethTables»
  110.       «%_SelProcs»
  111.       «%_Profiler»
  112.  
  113.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  114.  
  115.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, etc.
  116.  
  117.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  118.  
  119.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  120.  
  121.  
  122. Note: Tools Plus does not have a dependency on the Runtime.lib library.
  123.       Unless your application needs routines that are found only in the
  124.       full Runtime.lib library, you can use the smaller µRuntime.lib
  125.       library instead
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Tools Plus Segments in THINK Pascal
  132. ```````````````````````````````````
  133.   The segments containing Tools Plus libraries will be constantly accessed while your application is running.  It is preferable to pre-load those segments by flagging them as “Preload.”
  134.  
  135. Warning: Do not unload the segments containing Tools Plus libraries.
  136.          You can ensure that this doesn’t happen accidentally by
  137.          flagging them as not “Purgeable.”
  138.  
  139.  
  140.  
  141.  
  142. -----------------------------------------------------------------------
  143.  
  144.  
  145.  
  146.  
  147. Compiling The C Demo Application
  148. ````````````````````````````````
  149. The easiest way to compile the C demo application included with Tools Plus is to have the following files in the same folder:
  150.     Demo.π
  151.     Demo.π.rsrc
  152.     Demo.c
  153.     ToolsPlus.Lib1
  154.     ToolsPlus.Lib2
  155.     ToolsPlus.Lib3
  156.     ToolsPlus.h
  157.     ToolsPlus.c
  158.     PascalStrHandles.c
  159. Double-click the Demo.π project file to launch THINK C, then run your project.
  160.  
  161.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new project named “Demo.π” in the same folder as “Demo.π.rsrc” and “PascalStrHandles.c”.  Add the following files to your new project:
  162.     Segment 1:   MacTraps
  163.                  MacTraps2
  164.     Segment 2:   ANSI
  165.     Segment 3:   ToolsPlus.Lib1
  166.     Segment 4:   ToolsPlus.Lib2
  167.     Segment 5:   ToolsPlus.Lib3
  168.                  ToolsPlus.c
  169.                  Demo.π.rsrc   (add this file only if you are running
  170.                  THINK C 6.0.1 or higher)
  171.     Segment 6:   Demo.c
  172. You can now build your project and run your application.
  173.  
  174.  
  175.  
  176.  
  177. -----------------------------------------------------------------------
  178.  
  179.  
  180.  
  181.  
  182. Compiling The Pascal Demo Application
  183. `````````````````````````````````````
  184. The easiest way to compile the Pascal demo application included with Tools Plus is to have the following files in the same folder:
  185.     Demo.π
  186.     Demo.π.rsrc
  187.     Demo.p
  188.     ToolsPlus.Lib1
  189.     ToolsPlus.Lib2
  190.     ToolsPlus.Lib3
  191.     ToolsPlus.p
  192. Double-click the Demo.π project file to launch THINK Pascal, then run your project.
  193.  
  194.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new project named “Demo.π” in the same folder as “Demo.π.rsrc”.  Add the following files to your new project:
  195.     Segment 1:   Runtime.Lib
  196.                  Interface.Lib
  197.     Segment 2:   ToolsPlus.Lib1
  198.     Segment 3:   ToolsPlus.Lib2
  199.     Segment 4:   ToolsPlus.Lib3
  200.                  ToolsPlus.p
  201.     Segment 5:   Sound.p
  202.                  Demo.p
  203. You can now build your project.  After the initial compile, you will notice THINK Pascal created some additional entries in your project file:
  204.     «ToolsPlus.Lib1:1»
  205.     «ToolsPlus.Lib2:1»
  206.     «ToolsPlus.Lib3:1»
  207.     «%_MethTables»
  208.     «%_SelProcs»
  209.     «%_Profiler»
  210.  
  211.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  212.  
  213.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, and «ToolsPlus.Lib3:1» into the same segment as ToolsPlus.Lib3.
  214.  
  215.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  216.  
  217.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  218.